// Modules to control application life and create native browser window
const {app, BrowserWindow} = require('electron')
const path = require('path')

let mainWindow = null;

app.on('ready',()=>{
  mainWindow = new BrowserWindow({
    webPreferences:{
      nodeIntegration: true,
      contextIsolation: false
    },
    show:false
  })

  mainWindow.loadFile('index.html');
  mainWindow.once('ready-to-show',()=>{
    mainWindow.show();
  })
  mainWindow.on('closed',()=>{
    mainWindow = null;
  })
})